<template>
    <view>
        <u-navbar title="沃服销售商申请协议" safeAreaInsetTop fixed placeholder>
            <view class="coreshop-navbar-left-slot" slot="left">
                <u-icon name="arrow-left" size="19" @click="goNavigateBack"></u-icon>
                <u-line direction="column" :hairline="false" length="16" margin="0 8px"></u-line>
                <u-icon name="home" size="22" @click="goHome"></u-icon>
            </view>
            <view slot="right">
            </view>
        </u-navbar>
        <view ><!-- v-if="show" -->
            <u-toast ref="uToast" />
            <u-no-network></u-no-network>
          <view v-if="false"  class="coreshop-bg-red coreshop-solid-top coreshop-padding-left-80 coreshop-padding-right-80 coreshop-padding-top-45 coreshop-padding-bottom-45">
                <view class="coreshop-text-center coreshop-margin-bottom-10">
                    <text class="coreshop-text-white" v-if="condition.conditionStatus">已达标</text>
                    <text class="coreshop-text-white" v-if="!condition.conditionStatus">未达标</text>
                    <text class="coreshop-text-white coreshop-font-40">{{condition.conditionProgress}}%</text>
                </view>
                <!--<progress class="coreshop-progress-radius" percent="100" active stroke-width="10" activeColor="#fbbd08" />-->
                <u-line-progress :percentage="condition.conditionProgress" activeColor="#5FB878"></u-line-progress>
                <view class="coreshop-text-center coreshop-margin-bottom-10 coreshop-margin-top-10">
                    <text class="coreshop-text-white">{{condition.conditionMsg}}</text>
                </view>
                <view class="coreshop-text-left coreshop-margin-bottom-10  coreshop-margin-top-40">
                    <text class="coreshop-text-white coreshop-font-xs">注：消费金额只算实付金额部分，储值抵扣/退款退货金额不算在内。</text>
                </view>
            </view> 
            <!--标题-->
         <!--   <view class="coreshop-text-black coreshop-font-md  coreshop-padding-10 coreshop-solid-bottom">销售商申请协议</view> -->
            <!--内容-->
            <view class="coreshop-text-back coreshop-margin-20">
                <u-parse :content="distributionNotes" :selectable="true" style="margin-bottom: 500rpx; padding-bottom: 500rpx;"></u-parse>
            </view>
            <view class="coreshop-bg-white coreshop-footer-fixed coreshop-foot-padding-bottom">
                <u-button size="normal" style="color: #FF9518;" type="warning" @click="goApply()">已阅读并确认申请销售商</u-button>
            <!--    <u-button size="normal" type="primary" v-else>您的条件暂不满足</u-button>  v-if="condition.conditionStatus" -->
            </view>
        </view>
    </view>

</template>
<script>
    export default {
        data() {
            return {
                show: false,
                condition: {}
            }
        },
        methods: {
            goApply() {
                this.$u.route('/pages/member/dealer/apply/apply');
            }
        },
        computed: {
            distributionNotes() {
                return this.$store.state.config.dealerAgreement  //dealerAgreement dealerNotes
            }
        },
        onLoad: function () {
            // var _this = this;
            // _this.$u.api.getDealerInfo({ check_condition: true }).then(res => {
            //     if (res.status) {
            //         _this.condition = res.data;
            //         if (_this.condition.hasOwnProperty('verifyStatus')) {
            //             if (_this.condition.verifyStatus == 1 || (!_this.condition.needApply && _this.conditionStatus)) {
            //                 _this.$u.route({ type: 'redirectTo', url: '/pages/member/dealer/panel/panel' });
            //             } else if (_this.condition.verifyStatus > 1) {
            //                 _this.$u.route({ type: 'redirectTo', url: '/pages/member/dealer/applyState/applyState' });
            //             } else {
            //                 _this.show = true;
            //             }
            //         }
            //     } else {
            //         //报错了
            //         _this.$u.toast(res.msg);
            //     }
            // });
        }
    }
</script>
<style lang="scss" scoped>
    @import "index.scss";
</style>
